#ifndef __RTC_H__
#define __RTC_H__
#include "main.h"
typedef struct {
	uint8_t Second;
	uint8_t Minute;
	uint8_t Hour;
}RTC_BIN_TIME_t;

typedef struct {
	uint8_t Year;
	uint8_t Month;
	uint8_t Day;
	uint8_t Week;
}RTC_BIN_DATE_t;

typedef struct {
	uint32_t Second:8;
	uint32_t Minute:8;
	uint32_t Hour:8;
	uint32_t Reserved:8;
}RTC_BCD_TIME_t;

typedef struct {
	uint32_t Year:8;
	uint32_t Month:8;
	uint32_t Day:8;
	uint32_t Week:8;
}RTC_BCD_DATE_t;

typedef void (*GetRTCFun_t)(void);
typedef uint8_t (*SetRTCFun_t)(RTC_BIN_DATE_t* date, RTC_BIN_TIME_t* time);

typedef struct {
	RTC_BIN_DATE_t date;
	RTC_BIN_TIME_t time;
	GetRTCFun_t localtime;
	SetRTCFun_t setting;
}rtcStruct_t;
extern rtcStruct_t devRTC;
void RTC_Init(void);
#endif
